/**
 *	单据提醒设置
 *	开发者：雨中磐石
 *	地址：www.rockoa.com
 *	日期：2023-07-19
 */

package com.framework.Module.base.remind;

import com.framework.Table.Table;
import com.framerock.baselib.Rock;

public class Tableremind extends  Table{
	
 
    protected void initTable() {
        this.tablename   = "remind";
        this.tablenamesm = "单据提醒设置";

        this.flowsetMap  = Rock.getMap(new String[]{
                "type", "基础",
                "sort", "1",
                "isxt", "2",
                "sortdir","optdt desc",
                "imgurl","https://xinhu-1251238447.file.myqcloud.com/img/18972.png",
                "istj","1"
        });

        this.addfields("mknum", "varchar(50)", "", "对应模块", new String[]{
                "islb","1",
                "isbt","1",
                "attr","readonly"
        });
        this.addfields("mid", "int(11)", "0", "单据Id", new String[]{
                "isbt","1",
                "islb","0",
                "islu","1",
                "attr","readonly"
        });
        this.addfields("title", "varchar(100)", "", "标题", new String[]{
                "isss","1",
        });
        this.addfields("mess", "varchar(500)", "", "提醒内容", new String[]{
                "isss","1",
                "isbt","1",
                "isalign","1",
                "fieldstype","textarea",
        });
        this.addfields("recename", "varchar(1000)", "", "提醒给@receid@不选默认提醒给添加人", new String[]{
                "isss","1",
                "fieldstype","changedeptusercheck",
        });
        this.addfields("receid", "varchar(1000)", "", "提醒给人员ID", new String[]{
                "islu","0",
                "islb","0",
        });
        this.addfields("rate", "varchar(10)", "", "提醒频率", new String[]{
                "isbt","1",
                "fieldstype","select",
                "data","o|仅一次,i|每分钟,h|每小时,d|每天,m|每月,y|每年,w1|每周一,w2|每周二,w3|每周三,w4|每周四,w5|每周五,w6|每周六,w0|每周日,g|每工作日,x|每休息日"
        });
        this.addfields("rateval", "varchar(50)", "", "频率时间", new String[]{
                "isbt","1",
                "fieldstype","datetime",
                "isalign","1"
        });
        this.addfields("startdt", "datetime", null, "开始时间@@不设置长期", new String[]{
                "islb","1",
        });
        this.addfields("enddt", "datetime", null, "截止时间@@不设置长期", new String[]{
                "islb","0",
        });
        this.addfields("status", "tinyint(1)", "1", "状态@0|停用|gray,1|启用|green@启用这个", new String[]{
                "fieldstype","checkbox",
                "iseditlx","1",
                "ispx","1"
        });
        this.addfields("cid", "int(11)", "0", "对应单位", new String[]{
                "islb","0",
                "islu","0",
                "iszs","0"
        });
        this.addfields("optname", "varchar(50)", "", "操作人", new String[]{
                "islb","1",
                "islu","0"
        });
        this.addfields("optdt", "datetime", null, "操作时间", new String[]{
                "islb","0",
                "islu","0"
        });
        this.addfields("lastdt", "datetime", null, "上次运行", new String[]{
                "islb","1",
                "ispx","1",
                "islu","0"
        });
        this.addfields("lastcont", "varchar(2000)", "", "运行结果", new String[]{
                "islb","0",
                "islu","0"
        });
        this.addfields("aid", "int(11)", "0", "操作人ID", new String[]{
                "islb","0",
                "islu","0"
        });

        this.addfields("cid", "KEY", "`cid`", "单位ID");
        this.addfields("aid", "KEY", "`aid`", "人员ID");
        this.addfields("mknummid", "KEY", "`mknum`,`mid`", "关联模块");

        this.addWhere("我的设置", "my", "`aid`={aid}");
        this.addWhere("所有记录", "all", "1=1", "pnum=all");
    }
}
